Message Disposition Notification

A Message Disposition Notification (MDN) is a message issued by the receiver of a message.  At the very least, an MDN indicates successful delivery of a message to the receiver, but it contains other information as well such as reporting any errors from the received message.  The sender requests an MDN through the subject message itself or through other manual interaction.  

 

Format of MDN Message

An MDN is a composite message of content type “multipart/report” that consists of 3 body parts in the following order.

  1. A body part of human readable explanation of the MDN.
  2. A body part of the reported errors.  This body part is a composite message of content type “message/disposition-notification”.
  3. An optional body part containing the original message or some other text that helps in diagnosing the problem.


Figure 1. Format of an MDN as it relates to a sample of an MDN message.

 

How to generate an MDN

In Framework EDI (FREDI), you can generate an MDN using one of the following methods:

  1. Call BuildMDN method on mailMessage object.  If a message has not already been loaded when this method is called, a default MDN is created.  Example, (in Visual Basic)
    Dim oMailDocument As Fredi.mailDocument
    Dim oMessage As Fredi.mailMessage

    (Instance of oMailDocument is created)

    Set oMessage = oMailDocument.GetMessage
    ' Set oMessage = oMailDocument.GetMDN

    oMessage.BuildMDN
  2. In the mailDocument object, set the EnableAcknowledgment to TRUE before loading the message.  The option MailDocOpt_EnableMDN also has to be already enabled.  Example, (in Visual Basic)
    Dim oMailDocument As Fredi.mailDocument

    (Instance of oMailDocument is created)

    ' Enable MDN generation
    oMailDocument.EnableAcknowledgment = True

    ' Load the mail document.
    oMailDocument.Load App.Path & "\SampleMail.TXT"
  3. A non-AS2 (or non-AS3)  message requesting an MDN (without having to call the EnableAcknowledgment property) must have the following headers (Note: The option MailDocOpt_EnableMDN also has to be already enabled):

    Example, 


  4. An AS2 or AS3 message requesting an MDN (without having to call the EnableAcknowledgment property) must have the following headers (Note: The option MailDocOpt_EnableMDN also has to be already enabled):

    Example,